package com.liqing.example.consumer;

import com.liqing.example.common.model.User;
import com.liqing.example.common.service.UserService;
import com.liqing.lqrpc.proxy.ServiceProxyFactory;

/**
 * TODO 简易服务消费者示例
 *
 * @author Li Qing
 * @date 2024/7/4 0:01
 */
public class EasyConsumerExample {
    public static void main(String[] args) {
        UserService userService = ServiceProxyFactory.getProxy(UserService.class);
        User user = new User();
        user.setName("liqing");
        User newUser = userService.getUser(user);
        if (newUser != null) {
            System.out.println(newUser.getName());
        } else {
            System.out.println("user is null");
        }
    }
}
